<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<body>
	<div class="menu-box">
		<div class="menu-box-header"></div>
		<h:form id="form" prependId="false">

			<p:growl id="messages" showDetail="true" />

			<p:tree value="#{utilBean.root}" var="node" dynamic="true"
				cache="false" selectionMode="single"
				selection="#{treeBean.selectedNode}" id="tree">


				<p:ajax event="select" update=":form:messages"
					listener="#{utilBean.onNodeSelect}" />
				<p:ajax event="unselect" update=":form:messages"
					listener="#{utilBean.onNodeUnselect}" />

				<p:treeNode>
					<h:outputText value="#{node}" />
				</p:treeNode>
			</p:tree>

		</h:form>
		<h:form id="formC">

			<p:growl id="growl" showDetail="true" />

			<p:calendar value="#{utilBean.date1}" mode="inline" id="inlineCal">
				<p:ajax event="dateSelect" listener="#{utilBean.handleDateSelect}"
					update="growl" process="@this" />
			</p:calendar>

		</h:form>

	</div>

</body>
</html>